import React, { useState, useRef } from 'react'
import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { Button, Dialog, useDialog } from '../../components';
import BaseView from '../components/base-view'
export default (props: any) => {
  const [shows, setShows] = useState<boolean>(false)
  const dialog = useDialog()
  const sdfdsfs = () => {
    dialog.show({ message: "hahahah" })
  }
  return (
    <View style={{ backgroundColor: '#f2f2f2', flex: 1, width: '100%', height: '100%' }}>
      <BaseView title="基础用法">
        <Button onPress={sdfdsfs} style={styles.mrb} type="primary">基础</Button>
      </BaseView>
      <BaseView title="嵌入内容">
        <Button style={styles.mrb} onPress={() => setShows(!shows)} type="primary">嵌入内容</Button>
      </BaseView>

      <Dialog
        title="标题搜索"
        message='说短发个为发发的是非D出现在v现场'
        show={shows}
        onChange={setShows}
      >
      </Dialog>
    </View>
  )
}

const styles = StyleSheet.create({
  mr: {
    marginRight: 20,
  },
  mrb: {
    marginRight: 20,
  },
})